package com.itheima.mobilesafe.viruskilling.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.itheima.mobilesafe.R;

public class MyNetScanVirusAdapter extends BaseAdapter {
    private String [] md5s;
    private Context context;
    public MyNetScanVirusAdapter(Context context,String [] md5s){
        super();
        this.md5s = md5s;
        this.context = context;
    }
    @Override
    public int getCount() {
        return md5s.length;
    }

    @Override
    public Object getItem(int i) {
        return md5s[i];
    }

    @Override
    public long getItemId(int i) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup viewGroup) {
        LayoutInflater inflater = LayoutInflater.from(context);
        View view = inflater.inflate(R.layout.item_list_netvirus_gzz,null);
        final TextView textView = (TextView) view.findViewById(R.id.gzz_tv);
        textView.setText(md5s[position]);
        return view;
    }
    public void netVirusScan(View view){
        System.out.println("网络扫描啦");
    }

}
